import request from "@/utils/request";

// 获取分类列表Tree /admin-api/alipay/cps-activity-type/getTreeTypeList
export function getTreeTypeList() {
  return request({
    url: "/alipay/cps-activity-type/getTreeTypeList",
    method: "GET"
  });
}


// 新增cps活动 /admin-api/alipay/cps-activity/create
export function addCpsActivity(data) {
  return request({
    url: "/alipay/cps-activity/create",
    method: "POST",
    data
  });
}

// 获得cps活动分页 /admin-api/alipay/cps-activity/page
export function getCpsActivityPage(query) {
  return request({
    url: "/alipay/cps-activity/page",
    method: "GET",
    params: query
  });
}

//获得cps活动 /admin-api/alipay/cps-activity/get

export function getCpsActivity(id) {
  return request({
    url: "/alipay/cps-activity/get?id=" + id,
    method: "GET"
  });
}

// 更新cps活动 /admin-api/alipay/cps-activity/update
export function updateCpsActivity(data) {
  return request({
    url: "/alipay/cps-activity/update",
    method: "PUT",
    data
  });
}
